<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>The Build System &mdash; SIP 4.16.7 Reference Guide</title>
    
    <link rel="stylesheet" href="_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '4.16.7',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="shortcut icon" href="_static/logo_tn.ico"/>
    <link rel="top" title="SIP 4.16.7 Reference Guide" href="index.html" />
    <link rel="next" title="Building Your Extension with distutils" href="distutils.html" />
    <link rel="prev" title="Python API for Applications" href="python_api.html" /> 
  </head>
  <body role="document">
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="distutils.html" title="Building Your Extension with distutils"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="python_api.html" title="Python API for Applications"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">SIP 4.16.7 Reference Guide</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="module-sipconfig">
<span id="the-build-system"></span><span id="ref-build-system"></span><h1>The Build System<a class="headerlink" href="#module-sipconfig" title="Permalink to this headline">¶</a></h1>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">This should not be used for new projects as it will not be supported by SIP
v5.</p>
</div>
<p>The purpose of the build system is to make it easy for you to write
configuration scripts in Python for your own bindings.  The build system takes
care of the details of particular combinations of platform and compiler.  It
supports over 50 different platform/compiler combinations.</p>
<p>The build system is implemented as a pure Python module called <a class="reference internal" href="#module-sipconfig" title="sipconfig"><code class="xref py py-mod docutils literal"><span class="pre">sipconfig</span></code></a>
that contains a number of classes and functions.  Using this module you can
write bespoke configuration scripts (e.g. PyQt4&#8217;s <code class="docutils literal"><span class="pre">configure.py</span></code>) or use it
with other Python based build systems (e.g.
<a class="reference external" href="http://www.python.org/sigs/distutils-sig/distutils.html">Distutils</a> and
<a class="reference external" href="http://www.scons.org">SCons</a>).</p>
<p>An important feature of SIP is the ability to generate bindings that are built
on top of existing bindings.  For example, both
<a class="reference external" href="http://www.riverbankcomputing.com/software/pykde/">PyKDE</a> and
<a class="reference external" href="http://pyqwt.sourceforge.net/">PyQwt</a> are built on top of PyQt4 but all
three packages are maintained by different developers.  To make this easier
PyQt4 includes its own configuration module, <code class="docutils literal"><span class="pre">pyqtconfig</span></code>, that contains
additional classes intended to be used by the configuration scripts of bindings
built on top of PyQt4.  The SIP build system includes facilities that do a lot
of the work of creating these additional configuration modules.</p>
<dl class="function">
<dt id="sipconfig.create_config_module">
<code class="descclassname">sipconfig.</code><code class="descname">create_config_module</code><span class="sig-paren">(</span><em>module</em>, <em>template</em>, <em>content</em><span class="optional">[</span>, <em>macros=None</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.create_config_module" title="Permalink to this definition">¶</a></dt>
<dd><p>This creates a configuration module (e.g. <code class="docutils literal"><span class="pre">pyqtconfig</span></code>) from a template
file and a string.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>module</strong> &#8211; the name of the configuration module file to create.</li>
<li><strong>template</strong> &#8211; the name of the template file.</li>
<li><strong>content</strong> &#8211; a string which replaces every occurence of the pattern
<code class="docutils literal"><span class="pre">&#64;SIP_CONFIGURATION&#64;</span></code> in the template file.  The content string is
usually created from a Python dictionary using
<a class="reference internal" href="#sipconfig.create_content" title="sipconfig.create_content"><code class="xref py py-func docutils literal"><span class="pre">sipconfig.create_content()</span></code></a>.  <em>content</em> may also be a
dictionary, in which case <a class="reference internal" href="#sipconfig.create_content" title="sipconfig.create_content"><code class="xref py py-func docutils literal"><span class="pre">sipconfig.create_content()</span></code></a> is
automatically called to convert it to a string.</li>
<li><strong>macros</strong> &#8211; an optional dictionary of platform specific build macros.  It is only
used if <a class="reference internal" href="#sipconfig.create_content" title="sipconfig.create_content"><code class="xref py py-func docutils literal"><span class="pre">sipconfig.create_content()</span></code></a> is called automatically to
convert a <em>content</em> dictionary to a string.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="sipconfig.create_content">
<code class="descclassname">sipconfig.</code><code class="descname">create_content</code><span class="sig-paren">(</span><em>dict</em><span class="optional">[</span>, <em>macros=None</em><span class="optional">]</span><span class="sig-paren">)</span> &rarr; string<a class="headerlink" href="#sipconfig.create_content" title="Permalink to this definition">¶</a></dt>
<dd><p>This converts a Python dictionary to a string that can be parsed by the
Python interpreter and converted back to an equivalent dictionary.  It is
typically used to generate the content string for
<a class="reference internal" href="#sipconfig.create_config_module" title="sipconfig.create_config_module"><code class="xref py py-func docutils literal"><span class="pre">sipconfig.create_config_module()</span></code></a>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>dict</strong> &#8211; the Python dictionary to convert.</li>
<li><strong>macros</strong> &#8211; the optional dictionary of platform specific build macros.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the string representation of the dictionary.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="sipconfig.create_wrapper">
<code class="descclassname">sipconfig.</code><code class="descname">create_wrapper</code><span class="sig-paren">(</span><em>script</em>, <em>wrapper</em><span class="optional">[</span>, <em>gui=0</em><span class="optional">[</span>, <em>use_arch=''</em><span class="optional">]</span><span class="optional">]</span><span class="sig-paren">)</span> &rarr; string<a class="headerlink" href="#sipconfig.create_wrapper" title="Permalink to this definition">¶</a></dt>
<dd><p>This creates a platform dependent executable wrapper around a Python
script.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>script</strong> &#8211; the full pathname of the script.</li>
<li><strong>wrapper</strong> &#8211; the full pathname of the wrapper to create, excluding any platform
specific extension.</li>
<li><strong>gui</strong> &#8211; is non-zero if a GUI enabled version of the interpreter should be used
on platforms that require it.</li>
<li><strong>use_arch</strong> &#8211; is the MacOS/X architectures to invoke python with.  Several space
separated architectures may be specified.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the platform specific name of the wrapper.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="sipconfig.error">
<code class="descclassname">sipconfig.</code><code class="descname">error</code><span class="sig-paren">(</span><em>msg</em><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.error" title="Permalink to this definition">¶</a></dt>
<dd><p>This displays an error message on <code class="docutils literal"><span class="pre">stderr</span></code> and calls <code class="docutils literal"><span class="pre">sys.exit(1)</span></code>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>msg</strong> &#8211; the text of the message and should not include any newline characters.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="sipconfig.format">
<code class="descclassname">sipconfig.</code><code class="descname">format</code><span class="sig-paren">(</span><em>msg</em><span class="optional">[</span>, <em>leftmargin=0</em><span class="optional">[</span>, <em>rightmargin=78</em><span class="optional">]</span><span class="optional">]</span><span class="sig-paren">)</span> &rarr; string<a class="headerlink" href="#sipconfig.format" title="Permalink to this definition">¶</a></dt>
<dd><p>This formats a message by inserting newline characters at appropriate
places.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>msg</strong> &#8211; the text of the message and should not include any newline characters.</li>
<li><strong>leftmargin</strong> &#8211; the optional position of the left margin.</li>
<li><strong>rightmargin</strong> &#8211; the optional position of the right margin.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the formatted message.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="sipconfig.inform">
<code class="descclassname">sipconfig.</code><code class="descname">inform</code><span class="sig-paren">(</span><em>msg</em><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.inform" title="Permalink to this definition">¶</a></dt>
<dd><p>This displays an information message on <code class="docutils literal"><span class="pre">stdout</span></code>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>msg</strong> &#8211; the text of the message and should not include any newline characters.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="sipconfig.parse_build_macros">
<code class="descclassname">sipconfig.</code><code class="descname">parse_build_macros</code><span class="sig-paren">(</span><em>filename</em>, <em>names</em><span class="optional">[</span>, <em>overrides=None</em><span class="optional">[</span>, <em>properties=None</em><span class="optional">]</span><span class="optional">]</span><span class="sig-paren">)</span> &rarr; dict<a class="headerlink" href="#sipconfig.parse_build_macros" title="Permalink to this definition">¶</a></dt>
<dd><p>This parses a <code class="docutils literal"><span class="pre">qmake</span></code> compatible file of build system macros and converts
it to a dictionary.  A macro is a name/value pair.  Individual macros may
be augmented or replaced.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>filename</strong> &#8211; the name of the file to parse.</li>
<li><strong>names</strong> &#8211; the list of the macro names to extract from the file.</li>
<li><strong>overrides</strong> &#8211; the optional list of macro names and values that modify those found in
the file.  They are of the form <code class="docutils literal"><span class="pre">name=value</span></code> (in which case the value
replaces the value found in the file) or <code class="docutils literal"><span class="pre">name+=value</span></code> (in which case
the value is appended to the value found in the file).</li>
<li><strong>properties</strong> &#8211; the optional dictionary of property name and values that are used to
resolve any expressions of the form <code class="docutils literal"><span class="pre">$[name]</span></code> in the file.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the dictionary of parsed macros or <code class="docutils literal"><span class="pre">None</span></code> if any of the overrides
were invalid.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="sipconfig.read_version">
<code class="descclassname">sipconfig.</code><code class="descname">read_version</code><span class="sig-paren">(</span><em>filename</em>, <em>description</em><span class="optional">[</span>, <em>numdefine=None</em><span class="optional">[</span>, <em>strdefine=None</em><span class="optional">]</span><span class="optional">]</span><span class="sig-paren">)</span> &rarr; integer, string<a class="headerlink" href="#sipconfig.read_version" title="Permalink to this definition">¶</a></dt>
<dd><p>This extracts version information for a package from a file, usually a C or
C++ header file.  The version information must each be specified as a
<code class="docutils literal"><span class="pre">#define</span></code> of a numeric (hexadecimal or decimal) value and/or a string
value.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>filename</strong> &#8211; the name of the file to read.</li>
<li><strong>description</strong> &#8211; a descriptive name of the package used in error messages.</li>
<li><strong>numdefine</strong> &#8211; the optional name of the <code class="docutils literal"><span class="pre">#define</span></code> of the version as a number.  If it
is <code class="docutils literal"><span class="pre">None</span></code> then the numeric version is ignored.</li>
<li><strong>strdefine</strong> &#8211; the optional name of the <code class="docutils literal"><span class="pre">#define</span></code> of the version as a string.  If it
is <code class="docutils literal"><span class="pre">None</span></code> then the string version is ignored.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">a tuple of the numeric and string versions.  <a class="reference internal" href="#sipconfig.error" title="sipconfig.error"><code class="xref py py-func docutils literal"><span class="pre">sipconfig.error()</span></code></a>
is called if either were required but could not be found.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="sipconfig.version_to_sip_tag">
<code class="descclassname">sipconfig.</code><code class="descname">version_to_sip_tag</code><span class="sig-paren">(</span><em>version</em>, <em>tags</em>, <em>description</em><span class="sig-paren">)</span> &rarr; string<a class="headerlink" href="#sipconfig.version_to_sip_tag" title="Permalink to this definition">¶</a></dt>
<dd><p>This converts a version number to a SIP version tag.  SIP uses the
<a class="reference internal" href="directives.html#directive-%Timeline"><code class="xref std std-directive docutils literal"><span class="pre">%Timeline</span></code></a> directive to define the chronology of the different
versions of the C/C++ library being wrapped.  Typically it is not necessary
to define a version tag for every version of the library, but only for
those versions that affect the library&#8217;s API as SIP sees it.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>version</strong> &#8211; the numeric version number of the C/C++ library being wrapped.  If it
is negative then the latest version is assumed.  (This is typically
useful if a development preview is indicated by a negative version
number.)</li>
<li><strong>tags</strong> &#8211; the dictionary of SIP version tags keyed by the corresponding C/C++
library version number.  The tag used is the one with the smallest key
(i.e. earliest version) that is greater than <em>version</em>.</li>
<li><strong>description</strong> &#8211; a descriptive name of the C/C++ library used in error messages.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the SIP version tag.  <a class="reference internal" href="#sipconfig.error" title="sipconfig.error"><code class="xref py py-func docutils literal"><span class="pre">sipconfig.error()</span></code></a> is called if the C/C++
library version number did not correspond to a SIP version tag.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="sipconfig.version_to_string">
<code class="descclassname">sipconfig.</code><code class="descname">version_to_string</code><span class="sig-paren">(</span><em>v</em><span class="sig-paren">)</span> &rarr; string<a class="headerlink" href="#sipconfig.version_to_string" title="Permalink to this definition">¶</a></dt>
<dd><p>This converts a 3 part version number encoded as a hexadecimal value to a
string.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>v</strong> &#8211; the version number.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">a string.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="class">
<dt id="sipconfig.Configuration">
<em class="property">class </em><code class="descclassname">sipconfig.</code><code class="descname">Configuration</code><a class="headerlink" href="#sipconfig.Configuration" title="Permalink to this definition">¶</a></dt>
<dd><p>This class encapsulates configuration values that can be accessed as
instance objects.  A sub-class may provide a dictionary of additional
configuration values in its constructor the elements of which will have
precedence over the super-class&#8217;s values.</p>
<p>The following configuration values are provided:</p>
<dl class="attribute">
<dt id="sipconfig.Configuration.default_bin_dir">
<code class="descname">default_bin_dir</code><a class="headerlink" href="#sipconfig.Configuration.default_bin_dir" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the directory where executables should be installed by
default.</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Configuration.default_mod_dir">
<code class="descname">default_mod_dir</code><a class="headerlink" href="#sipconfig.Configuration.default_mod_dir" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the directory where SIP generated modules should be
installed by default.</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Configuration.default_sip_dir">
<code class="descname">default_sip_dir</code><a class="headerlink" href="#sipconfig.Configuration.default_sip_dir" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the base directory where the <code class="docutils literal"><span class="pre">.sip</span></code> files for SIP
generated modules should be installed by default.  A sub-directory with
the same name as the module should be created and its <code class="docutils literal"><span class="pre">.sip</span></code> files
should be installed in the sub-directory.  The <code class="docutils literal"><span class="pre">.sip</span></code> files only need
to be installed if you might want to build other bindings based on
them.</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Configuration.platform">
<code class="descname">platform</code><a class="headerlink" href="#sipconfig.Configuration.platform" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the platform/compiler for which the build system has been
configured for.</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Configuration.py_conf_inc_dir">
<code class="descname">py_conf_inc_dir</code><a class="headerlink" href="#sipconfig.Configuration.py_conf_inc_dir" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the directory containing the <code class="docutils literal"><span class="pre">pyconfig.h</span></code> header file.</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Configuration.py_inc_dir">
<code class="descname">py_inc_dir</code><a class="headerlink" href="#sipconfig.Configuration.py_inc_dir" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the directory containing the <code class="docutils literal"><span class="pre">Python.h</span></code> header file.</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Configuration.py_lib_dir">
<code class="descname">py_lib_dir</code><a class="headerlink" href="#sipconfig.Configuration.py_lib_dir" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the directory containing the Python interpreter library.</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Configuration.py_version">
<code class="descname">py_version</code><a class="headerlink" href="#sipconfig.Configuration.py_version" title="Permalink to this definition">¶</a></dt>
<dd><p>The Python version as a 3 part hexadecimal number (e.g. v2.3.3 is
represented as <code class="docutils literal"><span class="pre">0x020303</span></code>).</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Configuration.sip_bin">
<code class="descname">sip_bin</code><a class="headerlink" href="#sipconfig.Configuration.sip_bin" title="Permalink to this definition">¶</a></dt>
<dd><p>The full pathname of the SIP executable.</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Configuration.sip_config_args">
<code class="descname">sip_config_args</code><a class="headerlink" href="#sipconfig.Configuration.sip_config_args" title="Permalink to this definition">¶</a></dt>
<dd><p>The command line passed to <code class="docutils literal"><span class="pre">configure.py</span></code> when SIP was configured.</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Configuration.sip_inc_dir">
<code class="descname">sip_inc_dir</code><a class="headerlink" href="#sipconfig.Configuration.sip_inc_dir" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the directory containing the <code class="docutils literal"><span class="pre">sip.h</span></code> header file.</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Configuration.sip_mod_dir">
<code class="descname">sip_mod_dir</code><a class="headerlink" href="#sipconfig.Configuration.sip_mod_dir" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the directory containing the SIP module.</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Configuration.sip_version">
<code class="descname">sip_version</code><a class="headerlink" href="#sipconfig.Configuration.sip_version" title="Permalink to this definition">¶</a></dt>
<dd><p>The SIP version as a 3 part hexadecimal number (e.g. v4.0.0 is
represented as <code class="docutils literal"><span class="pre">0x040000</span></code>).</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Configuration.sip_version_str">
<code class="descname">sip_version_str</code><a class="headerlink" href="#sipconfig.Configuration.sip_version_str" title="Permalink to this definition">¶</a></dt>
<dd><p>The SIP version as a string.  For development previews it will start
with <code class="docutils literal"><span class="pre">preview-</span></code> or <code class="docutils literal"><span class="pre">snapshot-</span></code>.</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Configuration.universal">
<code class="descname">universal</code><a class="headerlink" href="#sipconfig.Configuration.universal" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of the MacOS/X SDK used when creating universal binaries.</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Configuration.arch">
<code class="descname">arch</code><a class="headerlink" href="#sipconfig.Configuration.arch" title="Permalink to this definition">¶</a></dt>
<dd><p>The space separated MacOS/X architectures to build.</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Configuration.deployment_target">
<code class="descname">deployment_target</code><a class="headerlink" href="#sipconfig.Configuration.deployment_target" title="Permalink to this definition">¶</a></dt>
<dd><p>The MacOS/X deployment target.</p>
</dd></dl>

<dl class="method">
<dt id="sipconfig.Configuration.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><span class="optional">[</span><em>sub_cfg=None</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.Configuration.__init__" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>sub_cfg</strong> &#8211; an optional list of sub-class configurations.  It should only be
used by the <code class="docutils literal"><span class="pre">__init__()</span></code> method of a sub-class to append its own
dictionary of configuration values before passing the list to its
super-class.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sipconfig.Configuration.build_macros">
<code class="descname">build_macros</code><span class="sig-paren">(</span><span class="sig-paren">)</span> &rarr; dict<a class="headerlink" href="#sipconfig.Configuration.build_macros" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the dictionary of platform specific build macros.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">the macros dictionary.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sipconfig.Configuration.set_build_macros">
<code class="descname">set_build_macros</code><span class="sig-paren">(</span><em>macros</em><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.Configuration.set_build_macros" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the dictionary of platform specific build macros to be used when
generating Makefiles.  Normally there is no need to change the default
macros.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>macros</strong> &#8211; the macros dictionary.</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="sipconfig.Makefile">
<em class="property">class </em><code class="descclassname">sipconfig.</code><code class="descname">Makefile</code><a class="headerlink" href="#sipconfig.Makefile" title="Permalink to this definition">¶</a></dt>
<dd><p>This class encapsulates a Makefile.  It is intended to be sub-classed to
generate Makefiles for particular purposes.  It handles all platform and
compiler specific flags, but allows them to be adjusted to suit the
requirements of a particular module or program.  These are defined using a
number of macros which can be accessed as instance attributes.</p>
<p>The following instance attributes are provided to help in fine tuning the
generated Makefile:</p>
<dl class="attribute">
<dt id="sipconfig.Makefile.chkdir">
<code class="descname">chkdir</code><a class="headerlink" href="#sipconfig.Makefile.chkdir" title="Permalink to this definition">¶</a></dt>
<dd><p>A string that will check for the existence of a directory.</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Makefile.config">
<code class="descname">config</code><a class="headerlink" href="#sipconfig.Makefile.config" title="Permalink to this definition">¶</a></dt>
<dd><p>A reference to the <em>configuration</em> argument that was passed to
<a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">Makefile.__init__()</span></code></a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Makefile.console">
<code class="descname">console</code><a class="headerlink" href="#sipconfig.Makefile.console" title="Permalink to this definition">¶</a></dt>
<dd><p>A reference to the <em>console</em> argument that was passed to the
<a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">Makefile.__init__()</span></code></a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Makefile.copy">
<code class="descname">copy</code><a class="headerlink" href="#sipconfig.Makefile.copy" title="Permalink to this definition">¶</a></dt>
<dd><p>A string that will copy a file.</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Makefile.extra_cflags">
<code class="descname">extra_cflags</code><a class="headerlink" href="#sipconfig.Makefile.extra_cflags" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of additional flags passed to the C compiler.</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Makefile.extra_cxxflags">
<code class="descname">extra_cxxflags</code><a class="headerlink" href="#sipconfig.Makefile.extra_cxxflags" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of additional flags passed to the C++ compiler.</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Makefile.extra_defines">
<code class="descname">extra_defines</code><a class="headerlink" href="#sipconfig.Makefile.extra_defines" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of additional macro names passed to the C/C++ preprocessor.</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Makefile.extra_include_dirs">
<code class="descname">extra_include_dirs</code><a class="headerlink" href="#sipconfig.Makefile.extra_include_dirs" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of additional include directories passed to the C/C++
preprocessor.</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Makefile.extra_lflags">
<code class="descname">extra_lflags</code><a class="headerlink" href="#sipconfig.Makefile.extra_lflags" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of additional flags passed to the linker.</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Makefile.extra_lib_dirs">
<code class="descname">extra_lib_dirs</code><a class="headerlink" href="#sipconfig.Makefile.extra_lib_dirs" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of additional library directories passed to the linker.</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Makefile.extra_libs">
<code class="descname">extra_libs</code><a class="headerlink" href="#sipconfig.Makefile.extra_libs" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of additional libraries passed to the linker.  The names of the
libraries must be in platform neutral form (i.e. without any platform
specific prefixes, version numbers or extensions).</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Makefile.extra_source_dirs">
<code class="descname">extra_source_dirs</code><a class="headerlink" href="#sipconfig.Makefile.extra_source_dirs" title="Permalink to this definition">¶</a></dt>
<dd><p>A list of additional source directories passed to <code class="docutils literal"><span class="pre">make</span></code>.</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Makefile.generator">
<code class="descname">generator</code><a class="headerlink" href="#sipconfig.Makefile.generator" title="Permalink to this definition">¶</a></dt>
<dd><p>A string that defines the platform specific style of Makefile.  The
only supported values are <code class="docutils literal"><span class="pre">UNIX</span></code>, <code class="docutils literal"><span class="pre">MSVC</span></code>, <code class="docutils literal"><span class="pre">MSVC.NET</span></code>, <code class="docutils literal"><span class="pre">MINGW</span></code>
and <code class="docutils literal"><span class="pre">BMAKE</span></code>.</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Makefile.mkdir">
<code class="descname">mkdir</code><a class="headerlink" href="#sipconfig.Makefile.mkdir" title="Permalink to this definition">¶</a></dt>
<dd><p>A string that will create a directory.</p>
</dd></dl>

<dl class="attribute">
<dt id="sipconfig.Makefile.rm">
<code class="descname">rm</code><a class="headerlink" href="#sipconfig.Makefile.rm" title="Permalink to this definition">¶</a></dt>
<dd><p>A string that will remove a file.</p>
</dd></dl>

<dl class="method">
<dt id="sipconfig.Makefile.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>configuration</em><span class="optional">[</span>, <em>console=0</em><span class="optional">[</span>, <em>qt=0</em><span class="optional">[</span>, <em>opengl=0</em><span class="optional">[</span>, <em>python=0</em><span class="optional">[</span>, <em>threaded=0</em><span class="optional">[</span>, <em>warnings=None</em><span class="optional">[</span>, <em>debug=0</em><span class="optional">[</span>, <em>dir=None</em><span class="optional">[</span>, <em>makefile=&quot;Makefile&quot;</em><span class="optional">[</span>, <em>installs=None</em><span class="optional">[</span>, <em>universal=None</em><span class="optional">[</span>, <em>arch=None</em><span class="optional">[</span>, <em>deployment_target=None</em><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.Makefile.__init__" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>configuration</strong> &#8211; the current configuration and is an instance of the
<a class="reference internal" href="#sipconfig.Configuration" title="sipconfig.Configuration"><code class="xref py py-class docutils literal"><span class="pre">Configuration</span></code></a> class or a sub-class.</li>
<li><strong>console</strong> &#8211; is set if the target is a console (rather than GUI) target.  This
only affects Windows and is ignored on other platforms.</li>
<li><strong>qt</strong> &#8211; is set if the target uses Qt.  For Qt v4 a list of Qt libraries may
be specified and a simple non-zero value implies QtCore and QtGui.</li>
<li><strong>opengl</strong> &#8211; is set if the target uses OpenGL.</li>
<li><strong>python</strong> &#8211; is set if the target uses Python.h.</li>
<li><strong>threaded</strong> &#8211; is set if the target requires thread support.  It is set
automatically if the target uses Qt and Qt has thread support
enabled.</li>
<li><strong>warnings</strong> &#8211; is set if compiler warning messages should be enabled.  The default
of <code class="docutils literal"><span class="pre">None</span></code> means that warnings are enabled for SIP v4.x and
disabled for SIP v3.x.</li>
<li><strong>debug</strong> &#8211; is set if debugging symbols should be generated.</li>
<li><strong>dir</strong> &#8211; the name of the directory where build files are read from (if they
are not absolute file names) and Makefiles are written to.  The
default of <code class="docutils literal"><span class="pre">None</span></code> means the current directory is used.</li>
<li><strong>makefile</strong> &#8211; the name of the generated Makefile.</li>
<li><strong>installs</strong> &#8211; the list of extra install targets.  Each element is a two part
list, the first of which is the source and the second is the
destination.  If the source is another list then it is a list of
source files and the destination is a directory.</li>
<li><strong>universal</strong> &#8211; the name of the SDK if universal binaries are to be created under
MacOS/X.  If it is <code class="docutils literal"><span class="pre">None</span></code> then the value is taken from the
configuration.</li>
<li><strong>arch</strong> &#8211; the space separated MacOS/X architectures to build.  If it is
<code class="docutils literal"><span class="pre">None</span></code> then the value is taken from the configuration.</li>
<li><strong>deployment_target</strong> &#8211; the MacOS/X deployment target.  If it is <code class="docutils literal"><span class="pre">None</span></code> then the value is
taken from the configuration.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sipconfig.Makefile.clean_build_file_objects">
<code class="descname">clean_build_file_objects</code><span class="sig-paren">(</span><em>mfile</em>, <em>build</em><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.Makefile.clean_build_file_objects" title="Permalink to this definition">¶</a></dt>
<dd><p>This generates the Makefile commands that will remove any files
generated during the build of the default target.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>mfile</strong> &#8211; the Python file object of the Makefile.</li>
<li><strong>build</strong> &#8211; the dictionary created from parsing the build file.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sipconfig.Makefile.finalise">
<code class="descname">finalise</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.Makefile.finalise" title="Permalink to this definition">¶</a></dt>
<dd><p>This is called just before the Makefile is generated to ensure that it
is fully configured.  It must be reimplemented by a sub-class.</p>
</dd></dl>

<dl class="method">
<dt id="sipconfig.Makefile.generate">
<code class="descname">generate</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.Makefile.generate" title="Permalink to this definition">¶</a></dt>
<dd><p>This generates the Makefile.</p>
</dd></dl>

<dl class="method">
<dt id="sipconfig.Makefile.generate_macros_and_rules">
<code class="descname">generate_macros_and_rules</code><span class="sig-paren">(</span><em>mfile</em><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.Makefile.generate_macros_and_rules" title="Permalink to this definition">¶</a></dt>
<dd><p>This is the default implementation of the Makefile macros and rules
generation.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>mfile</strong> &#8211; the Python file object of the Makefile.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sipconfig.Makefile.generate_target_clean">
<code class="descname">generate_target_clean</code><span class="sig-paren">(</span><em>mfile</em><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.Makefile.generate_target_clean" title="Permalink to this definition">¶</a></dt>
<dd><p>This is the default implementation of the Makefile clean target
generation.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>mfile</strong> &#8211; the Python file object of the Makefile.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sipconfig.Makefile.generate_target_default">
<code class="descname">generate_target_default</code><span class="sig-paren">(</span><em>mfile</em><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.Makefile.generate_target_default" title="Permalink to this definition">¶</a></dt>
<dd><p>This is the default implementation of the Makefile default target
generation.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>mfile</strong> &#8211; the Python file object of the Makefile.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sipconfig.Makefile.generate_target_install">
<code class="descname">generate_target_install</code><span class="sig-paren">(</span><em>mfile</em><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.Makefile.generate_target_install" title="Permalink to this definition">¶</a></dt>
<dd><p>This is the default implementation of the Makefile install target
generation.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>mfile</strong> &#8211; the Python file object of the Makefile.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sipconfig.Makefile.install_file">
<code class="descname">install_file</code><span class="sig-paren">(</span><em>mfile</em>, <em>src</em>, <em>dst</em><span class="optional">[</span>, <em>strip=0</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.Makefile.install_file" title="Permalink to this definition">¶</a></dt>
<dd><p>This generates the Makefile commands to install one or more files to a
directory.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>mfile</strong> &#8211; the Python file object of the Makefile.</li>
<li><strong>src</strong> &#8211; the name of a single file to install or a list of a number of files
to install.</li>
<li><strong>dst</strong> &#8211; the name of the destination directory.</li>
<li><strong>strip</strong> &#8211; is set if the files should be stripped of unneeded symbols after
having been installed.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sipconfig.Makefile.optional_list">
<code class="descname">optional_list</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span> &rarr; list<a class="headerlink" href="#sipconfig.Makefile.optional_list" title="Permalink to this definition">¶</a></dt>
<dd><p>This returns an optional Makefile macro as a list.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> &#8211; the name of the macro.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">the macro as a list.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sipconfig.Makefile.optional_string">
<code class="descname">optional_string</code><span class="sig-paren">(</span><em>name</em><span class="optional">[</span>, <em>default=&quot;&quot;</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.Makefile.optional_string" title="Permalink to this definition">¶</a></dt>
<dd><p>This returns an optional Makefile macro as a string.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>name</strong> &#8211; the name of the macro.</li>
<li><strong>default</strong> &#8211; the optional default value of the macro.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the macro as a string.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sipconfig.Makefile.parse_build_file">
<code class="descname">parse_build_file</code><span class="sig-paren">(</span><em>filename</em><span class="sig-paren">)</span> &rarr; dict<a class="headerlink" href="#sipconfig.Makefile.parse_build_file" title="Permalink to this definition">¶</a></dt>
<dd><p>This parses a build file (created with the <a class="reference internal" href="command_line.html#cmdoption-sip-b"><code class="xref std std-option docutils literal"><span class="pre">-b</span></code></a> SIP
command line option) and converts it to a dictionary.  It can also
validate an existing dictionary created through other means.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>filename</strong> &#8211; is the name of the build file, or is a dictionary to
be validated.  A valid dictionary will contain the name of the
target to build (excluding any platform specific extension) keyed
by <code class="docutils literal"><span class="pre">target</span></code>; the names of all source files keyed by <code class="docutils literal"><span class="pre">sources</span></code>;
and, optionally, the names of all header files keyed by
<code class="docutils literal"><span class="pre">headers</span></code>.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">a dictionary corresponding to the parsed build file.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sipconfig.Makefile.platform_lib">
<code class="descname">platform_lib</code><span class="sig-paren">(</span><em>clib</em><span class="optional">[</span>, <em>framework=0</em><span class="optional">]</span><span class="sig-paren">)</span> &rarr; string<a class="headerlink" href="#sipconfig.Makefile.platform_lib" title="Permalink to this definition">¶</a></dt>
<dd><p>This converts a library name to a platform specific form.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
<li><strong>clib</strong> &#8211; the name of the library in cannonical form.</li>
<li><strong>framework</strong> &#8211; is set if the library is implemented as a MacOS framework.</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">the platform specific name.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sipconfig.Makefile.ready">
<code class="descname">ready</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.Makefile.ready" title="Permalink to this definition">¶</a></dt>
<dd><p>This is called to ensure that the Makefile is fully configured.  It is
normally called automatically when needed.</p>
</dd></dl>

<dl class="method">
<dt id="sipconfig.Makefile.required_string">
<code class="descname">required_string</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span> &rarr; string<a class="headerlink" href="#sipconfig.Makefile.required_string" title="Permalink to this definition">¶</a></dt>
<dd><p>This returns a required Makefile macro as a string.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>name</strong> &#8211; the name of the macro.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">the macro as a string.  An exception is raised if the macro does
not exist or has an empty value.</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="sipconfig.ModuleMakefile">
<em class="property">class </em><code class="descclassname">sipconfig.</code><code class="descname">ModuleMakefile</code><a class="headerlink" href="#sipconfig.ModuleMakefile" title="Permalink to this definition">¶</a></dt>
<dd><p>This class is derived from <a class="reference internal" href="#sipconfig.Makefile" title="sipconfig.Makefile"><code class="xref py py-class docutils literal"><span class="pre">sipconfig.Makefile</span></code></a>.</p>
<p>This class encapsulates a Makefile to build a generic Python extension
module.</p>
<dl class="method">
<dt id="sipconfig.ModuleMakefile.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>self</em>, <em>configuration</em>, <em>build_file</em><span class="optional">[</span>, <em>install_dir=None</em><span class="optional">[</span>, <em>static=0</em><span class="optional">[</span>, <em>console=0</em><span class="optional">[</span>, <em>opengl=0</em><span class="optional">[</span>, <em>threaded=0</em><span class="optional">[</span>, <em>warnings=None</em><span class="optional">[</span>, <em>debug=0</em><span class="optional">[</span>, <em>dir=None</em><span class="optional">[</span>, <em>makefile=&quot;Makefile&quot;</em><span class="optional">[</span>, <em>installs=None</em><span class="optional">[</span>, <em>strip=1</em><span class="optional">[</span>, <em>export_all=0</em><span class="optional">[</span>, <em>universal=None</em><span class="optional">[</span>, <em>arch=None</em><span class="optional">[</span>, <em>deployment_target=None</em><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.ModuleMakefile.__init__" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>configuration</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>build_file</strong> &#8211; the name of the build file.  Build files are generated using the
<a class="reference internal" href="command_line.html#cmdoption-sip-b"><code class="xref std std-option docutils literal"><span class="pre">-b</span></code></a> SIP command line option.</li>
<li><strong>install_dir</strong> &#8211; the name of the directory where the module will be optionally
installed.</li>
<li><strong>static</strong> &#8211; is set if the module should be built as a static library.</li>
<li><strong>console</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>qt</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>opengl</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>threaded</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>warnings</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>debug</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>dir</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>makefile</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>installs</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>strip</strong> &#8211; is set if the module should be stripped of unneeded symbols after
installation.  It is ignored if either <em>debug</em> or <em>static</em> is set,
or if the platform doesn&#8217;t support it.</li>
<li><strong>export_all</strong> &#8211; is set if all of the module&#8217;s symbols should be exported rather
than just the module&#8217;s initialisation function.  Exporting all
symbols increases the size of the module and slows down module load
times but may avoid problems with modules that use C++ exceptions.
All symbols are exported if either <em>debug</em> or <em>static</em> is set, or
if the platform doesn&#8217;t support it.</li>
<li><strong>universal</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>arch</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>deployment_target</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sipconfig.ModuleMakefile.finalise">
<code class="descname">finalise</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.ModuleMakefile.finalise" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a reimplementation of <a class="reference internal" href="#sipconfig.Makefile.finalise" title="sipconfig.Makefile.finalise"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.finalise()</span></code></a>.</p>
</dd></dl>

<dl class="method">
<dt id="sipconfig.ModuleMakefile.generate_macros_and_rules">
<code class="descname">generate_macros_and_rules</code><span class="sig-paren">(</span><em>mfile</em><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.ModuleMakefile.generate_macros_and_rules" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a reimplementation of
<a class="reference internal" href="#sipconfig.Makefile.generate_macros_and_rules" title="sipconfig.Makefile.generate_macros_and_rules"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.generate_macros_and_rules()</span></code></a>.</p>
</dd></dl>

<dl class="method">
<dt id="sipconfig.ModuleMakefile.generate_target_clean">
<code class="descname">generate_target_clean</code><span class="sig-paren">(</span><em>mfile</em><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.ModuleMakefile.generate_target_clean" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a reimplementation of
<a class="reference internal" href="#sipconfig.Makefile.generate_target_clean" title="sipconfig.Makefile.generate_target_clean"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.generate_target_clean()</span></code></a>.</p>
</dd></dl>

<dl class="method">
<dt id="sipconfig.ModuleMakefile.generate_target_default">
<code class="descname">generate_target_default</code><span class="sig-paren">(</span><em>mfile</em><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.ModuleMakefile.generate_target_default" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a reimplementation of
<a class="reference internal" href="#sipconfig.Makefile.generate_target_default" title="sipconfig.Makefile.generate_target_default"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.generate_target_default()</span></code></a>.</p>
</dd></dl>

<dl class="method">
<dt id="sipconfig.ModuleMakefile.generate_target_install">
<code class="descname">generate_target_install</code><span class="sig-paren">(</span><em>mfile</em><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.ModuleMakefile.generate_target_install" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a reimplementation of
<a class="reference internal" href="#sipconfig.Makefile.generate_target_install" title="sipconfig.Makefile.generate_target_install"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.generate_target_install()</span></code></a>.</p>
</dd></dl>

<dl class="method">
<dt id="sipconfig.ModuleMakefile.module_as_lib">
<code class="descname">module_as_lib</code><span class="sig-paren">(</span><em>mname</em><span class="sig-paren">)</span> &rarr; string<a class="headerlink" href="#sipconfig.ModuleMakefile.module_as_lib" title="Permalink to this definition">¶</a></dt>
<dd><p>This gets the name of a SIP v3.x module for when it is used as a
library to be linked against.  An exception will be raised if it is
used with SIP v4.x modules.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>mname</strong> &#8211; the name of the module.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">the corresponding library name.</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="sipconfig.ParentMakefile">
<em class="property">class </em><code class="descclassname">sipconfig.</code><code class="descname">ParentMakefile</code><a class="headerlink" href="#sipconfig.ParentMakefile" title="Permalink to this definition">¶</a></dt>
<dd><p>This class is derived from <a class="reference internal" href="#sipconfig.Makefile" title="sipconfig.Makefile"><code class="xref py py-class docutils literal"><span class="pre">sipconfig.Makefile</span></code></a>.</p>
<p>This class encapsulates a Makefile that sits above a number of other
Makefiles in sub-directories.</p>
<dl class="method">
<dt id="sipconfig.ParentMakefile.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>self, configuration, subdirs[, dir=None[, makefile[=&quot;Makefile&quot;[, installs=None]]]]</em><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.ParentMakefile.__init__" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>configuration</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>subdirs</strong> &#8211; the sequence of sub-directories.</li>
<li><strong>dir</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>makefile</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>installs</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sipconfig.ParentMakefile.generate_macros_and_rules">
<code class="descname">generate_macros_and_rules</code><span class="sig-paren">(</span><em>mfile</em><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.ParentMakefile.generate_macros_and_rules" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a reimplementation of
<a class="reference internal" href="#sipconfig.Makefile.generate_macros_and_rules" title="sipconfig.Makefile.generate_macros_and_rules"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.generate_macros_and_rules()</span></code></a>.</p>
</dd></dl>

<dl class="method">
<dt id="sipconfig.ParentMakefile.generate_target_clean">
<code class="descname">generate_target_clean</code><span class="sig-paren">(</span><em>mfile</em><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.ParentMakefile.generate_target_clean" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a reimplementation of
<a class="reference internal" href="#sipconfig.Makefile.generate_target_clean" title="sipconfig.Makefile.generate_target_clean"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.generate_target_clean()</span></code></a>.</p>
</dd></dl>

<dl class="method">
<dt id="sipconfig.ParentMakefile.generate_target_default">
<code class="descname">generate_target_default</code><span class="sig-paren">(</span><em>mfile</em><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.ParentMakefile.generate_target_default" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a reimplementation of
<a class="reference internal" href="#sipconfig.Makefile.generate_target_default" title="sipconfig.Makefile.generate_target_default"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.generate_target_default()</span></code></a>.</p>
</dd></dl>

<dl class="method">
<dt id="sipconfig.ParentMakefile.generate_target_install">
<code class="descname">generate_target_install</code><span class="sig-paren">(</span><em>mfile</em><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.ParentMakefile.generate_target_install" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a reimplementation of
<a class="reference internal" href="#sipconfig.Makefile.generate_target_install" title="sipconfig.Makefile.generate_target_install"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.generate_target_install()</span></code></a>.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="sipconfig.ProgramMakefile">
<em class="property">class </em><code class="descclassname">sipconfig.</code><code class="descname">ProgramMakefile</code><a class="headerlink" href="#sipconfig.ProgramMakefile" title="Permalink to this definition">¶</a></dt>
<dd><p>This class is derived from <a class="reference internal" href="#sipconfig.Makefile" title="sipconfig.Makefile"><code class="xref py py-class docutils literal"><span class="pre">sipconfig.Makefile</span></code></a>.</p>
<p>This class encapsulates a Makefile to build an executable program.</p>
<dl class="method">
<dt id="sipconfig.ProgramMakefile.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>configuration</em><span class="optional">[</span>, <em>build_file=None</em><span class="optional">[</span>, <em>install_dir=None</em><span class="optional">[</span>, <em>console=0</em><span class="optional">[</span>, <em>qt=0</em><span class="optional">[</span>, <em>opengl=0</em><span class="optional">[</span>, <em>python=0</em><span class="optional">[</span>, <em>threaded=0</em><span class="optional">[</span>, <em>warnings=None</em><span class="optional">[</span>, <em>debug=0</em><span class="optional">[</span>, <em>dir=None</em><span class="optional">[</span>, <em>makefile=&quot;Makefile&quot;</em><span class="optional">[</span>, <em>installs=None</em><span class="optional">[</span>, <em>universal=None</em><span class="optional">[</span>, <em>arch=None</em><span class="optional">[</span>, <em>deployment_target=None</em><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.ProgramMakefile.__init__" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>configuration</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>build_file</strong> &#8211; the name of the optional build file.  Build files are generated
using the <a class="reference internal" href="command_line.html#cmdoption-sip-b"><code class="xref std std-option docutils literal"><span class="pre">-b</span></code></a> SIP command line option.</li>
<li><strong>install_dir</strong> &#8211; the name of the directory where the executable program will be
optionally installed.</li>
<li><strong>console</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>qt</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>opengl</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>python</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>threaded</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>warnings</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>debug</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>dir</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>makefile</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>installs</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>universal</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>arch</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>deployment_target</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sipconfig.ProgramMakefile.build_command">
<code class="descname">build_command</code><span class="sig-paren">(</span><em>source</em><span class="sig-paren">)</span> &rarr; string, string<a class="headerlink" href="#sipconfig.ProgramMakefile.build_command" title="Permalink to this definition">¶</a></dt>
<dd><p>This creates a single command line that will create an executable
program from a single source file.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>source</strong> &#8211; the name of the source file.</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">a tuple of the name of the executable that will be created and the
command line.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sipconfig.ProgramMakefile.finalise">
<code class="descname">finalise</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.ProgramMakefile.finalise" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a reimplementation of <a class="reference internal" href="#sipconfig.Makefile.finalise" title="sipconfig.Makefile.finalise"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.finalise()</span></code></a>.</p>
</dd></dl>

<dl class="method">
<dt id="sipconfig.ProgramMakefile.generate_macros_and_rules">
<code class="descname">generate_macros_and_rules</code><span class="sig-paren">(</span><em>mfile</em><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.ProgramMakefile.generate_macros_and_rules" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a reimplementation of
<a class="reference internal" href="#sipconfig.Makefile.generate_macros_and_rules" title="sipconfig.Makefile.generate_macros_and_rules"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.generate_macros_and_rules()</span></code></a>.</p>
</dd></dl>

<dl class="method">
<dt id="sipconfig.ProgramMakefile.generate_target_clean">
<code class="descname">generate_target_clean</code><span class="sig-paren">(</span><em>mfile</em><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.ProgramMakefile.generate_target_clean" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a reimplementation of
<a class="reference internal" href="#sipconfig.Makefile.generate_target_clean" title="sipconfig.Makefile.generate_target_clean"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.generate_target_clean()</span></code></a>.</p>
</dd></dl>

<dl class="method">
<dt id="sipconfig.ProgramMakefile.generate_target_default">
<code class="descname">generate_target_default</code><span class="sig-paren">(</span><em>mfile</em><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.ProgramMakefile.generate_target_default" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a reimplementation of
<a class="reference internal" href="#sipconfig.Makefile.generate_target_default" title="sipconfig.Makefile.generate_target_default"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.generate_target_default()</span></code></a>.</p>
</dd></dl>

<dl class="method">
<dt id="sipconfig.ProgramMakefile.generate_target_install">
<code class="descname">generate_target_install</code><span class="sig-paren">(</span><em>mfile</em><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.ProgramMakefile.generate_target_install" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a reimplementation of
<a class="reference internal" href="#sipconfig.Makefile.generate_target_install" title="sipconfig.Makefile.generate_target_install"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.generate_target_install()</span></code></a>.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="sipconfig.PythonModuleMakefile">
<em class="property">class </em><code class="descclassname">sipconfig.</code><code class="descname">PythonModuleMakefile</code><a class="headerlink" href="#sipconfig.PythonModuleMakefile" title="Permalink to this definition">¶</a></dt>
<dd><p>This class is derived from <a class="reference internal" href="#sipconfig.Makefile" title="sipconfig.Makefile"><code class="xref py py-class docutils literal"><span class="pre">sipconfig.Makefile</span></code></a>.</p>
<p>This class encapsulates a Makefile that installs a pure Python module.</p>
<dl class="method">
<dt id="sipconfig.PythonModuleMakefile.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>self</em>, <em>configuration</em>, <em>dstdir</em><span class="optional">[</span>, <em>srcdir=None</em><span class="optional">[</span>, <em>dir=None</em><span class="optional">[</span>, <em>makefile=&quot;Makefile&quot;</em><span class="optional">[</span>, <em>installs=None</em><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.PythonModuleMakefile.__init__" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>configuration</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>dstdir</strong> &#8211; the name of the directory in which the module&#8217;s Python code will be
installed.</li>
<li><strong>srcdir</strong> &#8211; the name of the directory (relative to <em>dir</em>) containing the
module&#8217;s Python code.  It defaults to the same directory.</li>
<li><strong>dir</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>makefile</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>installs</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sipconfig.PythonModuleMakefile.generate_macros_and_rules">
<code class="descname">generate_macros_and_rules</code><span class="sig-paren">(</span><em>mfile</em><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.PythonModuleMakefile.generate_macros_and_rules" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a reimplementation of
<a class="reference internal" href="#sipconfig.Makefile.generate_macros_and_rules" title="sipconfig.Makefile.generate_macros_and_rules"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.generate_macros_and_rules()</span></code></a>.</p>
</dd></dl>

<dl class="method">
<dt id="sipconfig.PythonModuleMakefile.generate_target_install">
<code class="descname">generate_target_install</code><span class="sig-paren">(</span><em>mfile</em><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.PythonModuleMakefile.generate_target_install" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a reimplementation of
<a class="reference internal" href="#sipconfig.Makefile.generate_target_install" title="sipconfig.Makefile.generate_target_install"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.generate_target_install()</span></code></a>.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="sipconfig.SIPModuleMakefile">
<em class="property">class </em><code class="descclassname">sipconfig.</code><code class="descname">SIPModuleMakefile</code><a class="headerlink" href="#sipconfig.SIPModuleMakefile" title="Permalink to this definition">¶</a></dt>
<dd><p>This class is derived from <a class="reference internal" href="#sipconfig.ModuleMakefile" title="sipconfig.ModuleMakefile"><code class="xref py py-class docutils literal"><span class="pre">sipconfig.ModuleMakefile</span></code></a>.</p>
<p>This class encapsulates a Makefile to build a SIP generated Python
extension module.</p>
<dl class="method">
<dt id="sipconfig.SIPModuleMakefile.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>self</em>, <em>configuration</em>, <em>build_file</em><span class="optional">[</span>, <em>install_dir=None</em><span class="optional">[</span>, <em>static=0</em><span class="optional">[</span>, <em>console=0</em><span class="optional">[</span>, <em>opengl=0</em><span class="optional">[</span>, <em>threaded=0</em><span class="optional">[</span>, <em>warnings=None</em><span class="optional">[</span>, <em>debug=0</em><span class="optional">[</span>, <em>dir=None</em><span class="optional">[</span>, <em>makefile=&quot;Makefile&quot;</em><span class="optional">[</span>, <em>installs=None</em><span class="optional">[</span>, <em>strip=1</em><span class="optional">[</span>, <em>export_all=0</em><span class="optional">[</span>, <em>universal=None</em><span class="optional">[</span>, <em>arch=None</em><span class="optional">[</span>, <em>prot_is_public=0</em><span class="optional">[</span>, <em>deployment_target=None</em><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.SIPModuleMakefile.__init__" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>configuration</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>build_file</strong> &#8211; see <a class="reference internal" href="#sipconfig.ModuleMakefile.__init__" title="sipconfig.ModuleMakefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.ModuleMakefile.__init__()</span></code></a>.</li>
<li><strong>install_dir</strong> &#8211; see <a class="reference internal" href="#sipconfig.ModuleMakefile.__init__" title="sipconfig.ModuleMakefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.ModuleMakefile.__init__()</span></code></a>.</li>
<li><strong>static</strong> &#8211; see <a class="reference internal" href="#sipconfig.ModuleMakefile.__init__" title="sipconfig.ModuleMakefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.ModuleMakefile.__init__()</span></code></a>.</li>
<li><strong>console</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>qt</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>opengl</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>threaded</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>warnings</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>debug</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>dir</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>makefile</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>installs</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>strip</strong> &#8211; see <a class="reference internal" href="#sipconfig.ModuleMakefile.__init__" title="sipconfig.ModuleMakefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.ModuleMakefile.__init__()</span></code></a>.</li>
<li><strong>export_all</strong> &#8211; see <a class="reference internal" href="#sipconfig.ModuleMakefile.__init__" title="sipconfig.ModuleMakefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.ModuleMakefile.__init__()</span></code></a>.</li>
<li><strong>universal</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>arch</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
<li><strong>prot_is_public</strong> &#8211; is set if <code class="docutils literal"><span class="pre">protected</span></code> should be redefined as <code class="docutils literal"><span class="pre">public</span></code> when
compiling the generated module.</li>
<li><strong>deployment_target</strong> &#8211; see <a class="reference internal" href="#sipconfig.Makefile.__init__" title="sipconfig.Makefile.__init__"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.__init__()</span></code></a>.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sipconfig.SIPModuleMakefile.finalise">
<code class="descname">finalise</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#sipconfig.SIPModuleMakefile.finalise" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a reimplementation of <a class="reference internal" href="#sipconfig.Makefile.finalise" title="sipconfig.Makefile.finalise"><code class="xref py py-meth docutils literal"><span class="pre">sipconfig.Makefile.finalise()</span></code></a>.</p>
</dd></dl>

</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="index.html">
              <img class="logo" src="_static/logo.png" alt="Logo"/>
            </a></p>
  <h4>Previous topic</h4>
  <p class="topless"><a href="python_api.html"
                        title="previous chapter">Python API for Applications</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="distutils.html"
                        title="next chapter">Building Your Extension with distutils</a></p>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="distutils.html" title="Building Your Extension with distutils"
             >next</a> |</li>
        <li class="right" >
          <a href="python_api.html" title="Python API for Applications"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">SIP 4.16.7 Reference Guide</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &copy; Copyright 2015 Riverbank Computing Limited.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3.1.
    </div>
  </body>
</html>